package net.xconcepts.stockdata.model.analysis;

import java.util.Collection;
import java.util.List;

import org.apache.commons.math3.stat.regression.SimpleRegression;

/** Estimates the first derivative of an Indicator based on a provided
 * number of data points.
 * @author Steven
 *
 */
public class TrendAnalyzer {
	
	public static double getSlope(List<Double> items) {
		SimpleRegression regression = new SimpleRegression();

		
		for (int i = 0; i < items.size(); i++) {
			regression.addData(i, items.get(i));
		}

		return regression.getSlope();
	}
	
	public static double getSampleStandardDev (Collection<Double> items) {
		return 0;
	}
}
